#!/usr/bin/env lua

module("demo", package.seeall)
--local lfs = require("lfs")
local JSON = require("cjson")
local file
local f = {}
local homepath = "/usr/local/moochine-demo/file/"
function main(req, resp,name)
	resp.headers['Content-Type'] = 'application/json'
	if req.method == 'GET' then
	  resp:writeln("aaaaaa")
	end
	if req.method=='POST' then
       -- resp:writeln('POST to Host: ' .. req.host)
        req:read_body()
        --resp.headers['Content-Type'] = 'application/json'
        resp:writeln(JSON.encode(req.post_args))
       
        
    end
 end

